/**
 * cateGory: 仪表盘
 */
import { colorCommon } from '../common-option'
import { mergeOption } from '../util'
export default {
  name: 'gauge',
  option(param) {
    const opts = mergeOption(param, {
      color: colorCommon,
      series: [
        {
          type: 'gauge',
          startAngle: 90,
          endAngle: -270,
          pointer: {
            show: false
          },
          progress: {
            show: true,
            overlap: false,
            roundCap: true,
            clip: false
          },
          axisLine: {
            lineStyle: {
              width: 40
            }
          },
          splitLine: {
            show: false
          },
          axisTick: {
            show: false
          },
          axisLabel: {
            show: false
          },
          title: {
            show: false
          },
          data: []
        }
      ]
    })
    opts.series.forEach((gauge) => {
      gauge.data.forEach((item) => {
        item.detail = {
          offsetCenter: ['150%', '0%']
        }
      })
    })
    return opts
  }
}
